import { Entity, PrimaryGeneratedColumn, Column } from 'typeorm'

@Entity('routers')
export class Router {
  @PrimaryGeneratedColumn()
  _id: number

  @Column({ type: 'varchar', length: 255 })
  name: string

  @Column({ type: 'varchar', length: 255 })
  path: string

  @Column({ type: 'varchar', length: 255, nullable: true })
  title: string | null

  @Column({ type: 'boolean', default: false })
  requiresAuth: boolean

  @Column({ type: 'varchar', length: 255, nullable: true })
  icon: string | null

  @Column({ type: 'varchar', length: 50, nullable: true })
  menuType: string | null

  @Column({ type: 'boolean', default: false })
  pinTab: boolean

  @Column({ type: 'boolean', default: false })
  keepAlive: boolean

  @Column({ type: 'varchar', length: 255, nullable: true })
  componentPath: string | null

  @Column({ type: 'int', nullable: true })
  id: number | null

  @Column({ type: 'int', nullable: true })
  pid: number | null
}
